home *** CD-ROM | disk | FTP | other *** search
- /* control87.c FUNCTION, FROM P. 204 OF TURBO C */
- #include<stdio.h>
- #include<float.h>
- main()
- {
- double a = 0.1;
-
- printf("current control word = %.4x\n",_control87(0,0));
- _control87(pc_24, MCW_PC);
- printf("0.1 * 0.1 = 0.01 in 24 bit percision = %.15e\n", a*a);
- _control87(CW_DEFUALT, 0xffff);
- printf("0.1 * 0.1 = 0.01 in 64 bit percison = %.15e\n", a*a);
- }